<?php

/**
 * AnulacionTesis form.
 *
 * @package    sistema_estadisticas
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class AnulacionTesisForm extends BaseAnulacionTesisForm
{

	public function configure()
	{
		$this->widgetSchema['tesis_id'] = new sfWidgetFormInputHidden();
		$this->widgetSchema['f_peticion'] = new WidgetFormDatePick();

		$this->widgetSchema->setLabel('f_peticion', 'Fecha de petición');
	}
	
	protected function doSave($con = null)
	{
		$this->updateObject();
		$this->getObject()->save($con);
		
		$this->getObject()->getTesis()->anular();
		$this->getObject()->getTesis()->save($con);
	}

}
